import requests
import json
url='https://fanyi.baidu.com/sug'
kw=input('请输入要翻译的文本：')
param = {'kw':kw}
handers={'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36'}
resp=requests.post(url=url,params=param,headers=handers)
resp.encouding='utf-8'
fo=resp.json()
print(fo['data'][0]['v'])

